from django.db import models

# Create your models here.

class Brand(models.Model):
    # 品牌名称：name 品牌首字母：firstletter 排序：sort 品牌制造商：
    mauhn=(
        (0,'不是'),
        (1,'是')
    )
    show=(
        (0,'不是'),
        (1,'是')
    )
    name = models.CharField(verbose_name='品牌管理',max_length=79)
    firstLetter = models.CharField(verbose_name='首字母',max_length=3)
    sort = models.IntegerField(verbose_name='排序',default=0)
    factoryStatus =models.SmallIntegerField(default=0,choices=mauhn,verbose_name='制造商')
    showStatus = models.SmallIntegerField(default=1,choices=show,verbose_name="是否显示")
    product_count = models.IntegerField(verbose_name="产品数量",default=0)
    product_commenr_count =models.IntegerField(verbose_name="产品评论数量",default=0)
    logo =models.CharField(verbose_name="品牌logo的图片",max_length=400)
    bigPic = models.CharField(verbose_name='专区大图',max_length=1000,null=True,blank=True)
    brand_storty = models.CharField(verbose_name="品牌故事",max_length=200)
    class Meta:
        db_table = "brand_goods"
        verbose_name_plural = "品牌商品"
    def __str__(self):
        return self.mauhn


